package com.fenghongzhang.day0122;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

public class MyReceiver2 extends BroadcastReceiver {

    private static final String TAG = "MyReceiver2";
    @Override
    public void onReceive(Context context, Intent intent) {
        Log.i(TAG, "onReceive: 2222");

//        //频道
//        String action = intent.getAction();
//        Log.i(TAG, "onReceive: "+action);
//
//        Bundle extras = intent.getExtras();
//        String name = extras.getString("name");
//        Log.i(TAG, "onReceive: "+name);

        //是否有序
        if(isOrderedBroadcast()){
            //中断广播的传递.
            abortBroadcast();
        }
    }
}
